import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import PhoneBook from '@/components/PhoneBook'
import Add from '@/components/home/Add'
import Detail from '@/components/home/Detail'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'Login',
            component: Login
        },
        {
            path: '/phoneBook',
            name: 'PhoneBook',
            component: PhoneBook
        },
        {
            path: '/add',
            name: 'Add',
            component: Add
        },
        {
            path: '/detail/:id',
            name: 'Detail',
            component: Detail
        }
    ]
})
